package com.biubiu.biubiuexam.nosql.repository;

import com.biubiu.biubiuexam.nosql.model.ExamPaper;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * The interface Exam paper repository.
 */
public interface ExamPaperRepository extends MongoRepository<ExamPaper, String> {

    /**
     * Find exam paper by id exam paper.
     *
     * @param id the id
     * @return the exam paper
     */
    ExamPaper findExamPaperById(String id);

    /**
     * Find exam paper by link exam paper.
     *
     * @param link the link
     * @return the exam paper
     */
    ExamPaper findExamPaperByLink(String link);

    /**
     * Find exam paper all by author id list.
     *
     * @param authorId the author id
     * @return the list
     */
    List<ExamPaper> findExamPaperAllByAuthorId(Long authorId);

    long count();
}
